import { request } from "@/utils/request.js";
// 通过手机号获取验证码
export const getCodeAPI = (phone) =>
  request.post(`user/code?phone=${phone}`)

// 登录
export const loginAPI = (data) =>
  request.post('user/login', data)

export const registerAPI = (data) =>
  request(`user/register`, {
    params: data,
    method: 'post'
  })

// 根据id查询用户信息接口
export const getUserInfoByIdAPI = (id) =>
  request.get(`user/${id}`)

export const userAPI=(id)=>{
  return request(`user/${id}`)
}

export const itemAPT = ()=>{
  return request(`blog/of/me`)
}
